using System;
using System.Collections.Generic;
using System.Linq;
using Domain.Dummies.Dtos.Definitions;
using System.Runtime.Serialization;

namespace Domain.Dummies.Dtos
{
    [DataContract]
    public class ScheduleDto : IEntityDto
    {
        [DataMember]
        public Guid Id { get; set; }

        [DataMember]
        public IEnumerable<ScheduleEntryDto> OverallEntries { get; set; }

        [DataMember]
        public IEnumerable<ScheduleEntryDto> FirstWeekEntries
        {
            get { return OverallEntries.Where(x => x.Week == Week.First).ToList(); }
        }

        [DataMember]
        public IEnumerable<ScheduleEntryDto> SecondWeekEntries
        {
            get { return OverallEntries.Where(x => x.Week == Week.Second).ToList(); }
        }
    }
}